use std::env;
use common::command::Command;
use ls::list_system::{self, ListSystem};
use common::usage::Usage;

fn main() {
	let mut args: Vec<String> = env::args().collect();
	// 移除第一个程序名参数
	args.remove(0);

	let mut ls = ListSystem::new(Command::new("ls".to_string(), args), 
	match env::current_dir() {
		Ok(path) => {
			path.display().to_string()
		}
		Err(e) => {
			"/".to_string()
		}
	});

	ls.run();
}
